package com.yihen.controller;

import com.yihen.dto.AddBillAndRegistrationDto;
import com.yihen.dto.Result;
import com.yihen.service.CoreAddSerice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/core")
public class CoreController {
    @Autowired
    private CoreAddSerice coreAddSerice;

    @PostMapping("/add")
    public Result addBillAndRegistration(@RequestBody AddBillAndRegistrationDto dto) {
        return coreAddSerice.addRegistrationAndBill(dto);
    }
}
